package com.jielan;

import java.math.BigDecimal;

/**
 * Created by Administrator on 2016/11/21.
 */
public class test {
    public static void main(String[] args){

        test test = new test();
        test.changeS();

    }

    public void changeS(){
        Student s1 = new Student(1,"ckl","hello","eat");
        System.out.println(s1.toString());
        this.hi(s1);
        System.out.println(s1.toString());
    }

    public Student hi(Student student){

        student.setName("xjh");
        student.setDosomething("gohome");
        return student;

    }

}

class Student{
    private int id;
    private String name;
    private String say;
    private String dosomething;

    public Student(){}

    public Student(int id,String name,String say,String dosomething){
        this.id = id;
        this.name = name;
        this.say = say;
        this.dosomething = dosomething;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSay() {
        return say;
    }

    public void setSay(String say) {
        this.say = say;
    }

    public String getDosomething() {
        return dosomething;
    }

    public void setDosomething(String dosomething) {
        this.dosomething = dosomething;
    }

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", say='" + say + '\'' +
                ", dosomething='" + dosomething + '\'' +
                '}';
    }
}
